package com.kitwee.serialport.decoder.mitsubishi;

/**
 * 三菱Q系列解码器
 * 
 * @author zgh
 *
 */
public class QOutputFormFloatDecoder extends QInstructionToFloatDecoder {

	@Override
	public  synchronized Object decode(byte[] source) {
		//modified by zgh at 2016.08.22 8:21
		//生产长度(M)的前后差值用来当实际产量
		Object nowObject =  super.decode(source);
//		Object oldObject = deviceStatus.getExpand().get(instruction.getDecoder_object());
//		if(oldObject != null){
//			Float nowObjectTemp = Float.valueOf(nowObject+"");
//			Float oldObjectTemp = Float.valueOf(oldObject+"");
//			if(nowObjectTemp > oldObjectTemp){
//				Float outputTemp = nowObjectTemp - oldObjectTemp;
//				deviceStatus.getExpand().put("standard_output", outputTemp.intValue());
//			}else{
//				deviceStatus.getExpand().put("standard_output", 0);
//			}
//		}else{
//			deviceStatus.getExpand().put("standard_output", 0);
//		}
		return nowObject;
		
	}
	
}
